package base;

public class hellowrold {
    public static void main(String[] args) {
        int[] numbers;//定义
        numbers=new int[10];//开辟空间
        //赋值
        numbers[0]=1;
        numbers[1]=1;
        numbers[2]=1;
        numbers[3]=1;
        numbers[4]=1;
        numbers[5]=1;
        numbers[6]=1;
        numbers[7]=1;
        numbers[8]=1;
        numbers[9]=1;
        int sum=0;
        for (int i = 0; i < numbers.length; i++) {
            sum=sum+numbers[i];


        }
        System.out.println(sum);

    }
}




